import {interaction} from "@/package/tools/interaction";
import {listData} from "@/package/widget/table/base/util";

export default {
  name: '滚动表格',
  icon: '/img/text/table1.png',
  type: '表格',
  cptKey: 'scroll-table',
  width: 500,
  height: 175,
  options: {
    interaction,
    cptDataForm: {
      dataText: JSON.stringify(listData),
      dataSource: 1,
      pollTime: 0
    },
    attribute: {
      showIndex: true, // 显示序号
      border: {
        borderClass: 'bottom-border',
        borderColor: '#3b4c7d'
      },
      enabledScroll: true,
      scroll: {
        step: 1, // 数值越大速度滚动越快。
        limitMoveNum: 4, // 达到滚动数量
        hoverStop: true, // 是否启用鼠标 hover 控制。
        direction: 1, // 0 往下 1 往上 2 向左 3 向右
        singleHeight: 0, // 单步运动停止的高度
        waitTime: 1000 // 单步停止等待时间
      },
      even: {
        backgroundColor: 'rgba(0,0,0,0)',
        backgroundImage: 'http://image.feiel.cn/report-image/20230508/b9194ffa449246a681854b5c810abd21.png'
      },
      th: {
        fontFamily: '微软雅黑',
        color: '#3ff3eb',
        fontWeight: 'bold',
        fontStyle: 'normal',
        fontSize: 18,
        letterSpacing: 2,
        height: 40,
        backgroundColor: '#084494',
        marginBottom: 0,
        backgroundImage: 'http://image.feiel.cn/report-image/20230508/aadc9b0314464655bd2f207c8c0e5b51.png'
      },
      td: {
        fontFamily: '微软雅黑',
        color: '#fff',
        fontWeight: 'lighter',
        fontStyle: 'normal',
        fontSize: 16,
        letterSpacing: 0,
        height: 44,
        backgroundColor: 'rgba(0,0,0,0)',
        backgroundImage: 'http://image.feiel.cn/report-image/20230508/b9194ffa449246a681854b5c810abd21.png',
        marginBottom: 0, // 行间距
      },
      columns: [
        {id: 1, label: '序号', prop: 'index', width: '100px', isIndex: true, hidden: false, textAlign: 'center', color: ''},
        {id: 2, label: '设备名称', prop: 'device_name', width: '100px', isIndex: false, hidden: false, textAlign: 'center', color: ''},
        {id: 3, label: '设备类型', prop: 'device_type', width: '100px', isIndex: false, hidden: false, textAlign: 'center', color: ''},
        {id: 4, label: '设备状态', prop: 'device_state', width: '30%', isIndex: false, hidden: false, textAlign: 'center', color: '', render: ''}
      ]
    }
  }
}
